class UsersController < ApplicationController
  def index
  	@users = User.all
  end

  def new
  	@user = User.new
  end

  def create
  	@user = User.new(user_params)
  	if @user.save
  	redirect_to users_path
  	else
  	render :action => :index	
  	end

  end

  private
  def user_params
    params.require(:user).permit(:first_name, :last_name, :email_address, :password)
  end
end
